local jiansu_active = fk.CreateSkill{
    name = "#os_heg__jiansu_active"
}

jiansu_active:addEffect("active",{
    min_card_num = 1,
    target_num = 1,
    card_filter = function (self, player,to_select, selected)
      return Fk:getCardById(to_select):getMark("@@os_heg__jiansu-inhand") > 0
    end,
    target_filter = function(self, player,to_select, selected, selected_cards)
      if #selected ~= 0 then return end
      local to = to_select
      return to.hp <= #selected_cards and to:isWounded()
    end,
    on_use = function(self, room, effect)
      local player = effect.from
      local target = effect.tos[1]
      room:throwCard(effect.cards, jiansu_active.name, player)
      if not target.dead and target:isWounded() then
        room:recover({
          who = target,
          num = 1,
          recoverBy = player,
          skillName = "os_heg__jiansu",
        })
      end
    end,
})

Fk:loadTranslationTable{
   ["#os_heg__jiansu_active"] = "俭素",
}

return jiansu_active